package cn.net.isir.service2;

import cn.net.isir.dao.MinipIndexDataDao;
import cn.net.isir.dao.MyCommissionDao;
import cn.net.isir.entity.Factor;
import cn.net.isir.entity.Medals;
import cn.net.isir.entity.Shop;
import cn.net.isir.entity.TimeRange;
import com.github.pagehelper.PageInfo;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author liuxubo
 * @filename MyCommissionService.java
 * @package cn.net.isir.service2
 * @email lxb@isir.net.cn
 * @date 2019/03/21
 * @comment
 * @since 1.8
 */
@Service
public class MyCommissionService {
    @Resource
    private MinipIndexDataDao minipIndexDataDao;
    @Resource
    private MyCommissionDao myCommissionDao;

    /**
     * 获取首页数据
     *
     * @param salesmanId    用户ID
     * @param turnedShopIds 已转出店铺ID
     * @param timeRangeList 有效时间列表
     * @return 首页数据
     */
    public Map<String, BigDecimal> getIndexData(String salesmanId, String turnedShopIds, List<TimeRange> timeRangeList, Factor factor, List<Medals> medalsList) {
        return myCommissionDao.getIndexData(salesmanId, turnedShopIds, timeRangeList, factor, medalsList);
    }

    public List<Map<String, Object>> getCannotTurnShopList(String salesmanId, String turnedShopIds, Factor factor, List<TimeRange> timeRangeList) {
        return myCommissionDao.getCannotTurnShopList(salesmanId,turnedShopIds, factor, timeRangeList);
    }

    public List<Map<String, Object>> getCanTurnShopList(String salesmanId, String turnedShopIds, Factor factor, List<TimeRange> timeRangeList) {
        return myCommissionDao.getCanTurnShopList(salesmanId,turnedShopIds, factor, timeRangeList);
    }
}
